package org.way.iam.component;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component(value = "asyncComponent")
@Slf4j
public class AsyncComponent {

    @Async
    public void insertLog() {
        log.debug(Thread.currentThread().getName(),"run");
        try {
            Thread.sleep(3000);
        } catch (Exception e) {
            log.error(e.getMessage(),e);
        }
    }
}
